﻿<ResourceDictionary
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
	
    <!-- Resource dictionary entries should be defined here. -->
    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="Colors.xaml"/>
    </ResourceDictionary.MergedDictionaries>

    <Style x:Key="{x:Type ToolTip}" TargetType="ToolTip">
        <Setter Property="OverridesDefaultStyle" Value="true" />
        <Setter Property="HasDropShadow" Value="True" />
        <Setter Property="Template" Value="{DynamicResource ToolTipTemplate}"/>
    </Style>

    <ControlTemplate x:Key="ToolTipTemplate">
        <Border x:Name="Root" CornerRadius="0" Width="{TemplateBinding Width}" Height="{TemplateBinding Height}" BorderThickness="1">
        	 <VisualStateManager.VisualStateGroups>
              	<VisualStateGroup x:Name="OpenStates">
              		<VisualStateGroup.Transitions>
              			<VisualTransition From="Closed" GeneratedDuration="0:0:0.4" To="Open"/>
              			<VisualTransition From="Open" GeneratedDuration="0:0:0.4" To="Closed"/>
              		</VisualStateGroup.Transitions>
        	 		<VisualState x:Name="Closed">
        	 			<Storyboard>
        	 				<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="Root">
        	 					<EasingDoubleKeyFrame KeyTime="0" Value="0"/>
        	 				</DoubleAnimationUsingKeyFrames>
        	 			</Storyboard>
        	 		</VisualState>
        	 		<VisualState x:Name="Open"/>
        	 	</VisualStateGroup>
          	</VisualStateManager.VisualStateGroups>

        	<Border.BorderBrush>
        		<SolidColorBrush Color="{StaticResource Application_Control_BorderBrush}"/>
        	</Border.BorderBrush>
        	<Border.Background>
        		<SolidColorBrush Color="{StaticResource Application_Control_Background}"/>
        	</Border.Background>
            <ContentPresenter Margin="4" HorizontalAlignment="Left" VerticalAlignment="Top" />
        </Border>
	</ControlTemplate>
</ResourceDictionary>